<?
include "loggedin.inc.php";
require('../includes/messages.inc.php');
require('../includes/config.inc.php');
require("header.php");
require('../includes/styles.inc.php'); 

$q1 = "select * from PHPAUCTION_banners where BannerID = '$_GET[id]' ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);

unlink("../banners/$a1[BannerFile]");

$q1 = "delete from PHPAUCTION_banners where BannerID = '$_GET[id]' ";
mysql_query($q1) or die(mysql_error());

echo("<BR><BR><BR><center><font face=verdana size=2>Banner deleted</font></center><BR><BR><BR><BR><BR><BR>");
require("footer.php");

?>